﻿using System.Diagnostics.Contracts;
using Library.Collections.Generic;

namespace Library.Collections.Specialized
{
    public interface IMapTryReadOnly : IMapReadOnly
    {
        [Pure]
        bool TryGetValue(object key, out object value);
    }

    public interface IMapTryReadOnly<in TKey, TValue> : IMapReadOnly<TKey, TValue>
    {
        [Pure]
        bool TryGetValue(TKey key, out TValue value);
    }

    public interface IMapTryWriteOnly : IMapWriteOnly
    {
        bool TrySetValue(object key, object value);
    }

    public interface IMapTryWriteOnly<in TKey, in TValue> : IMapWriteOnly<TKey, TValue>
    {
        bool TrySetValue(TKey key, TValue value);
    }
}
